package com.csun.cmny.provider.service;

import com.csun.cmny.provider.model.vo.OmcUserVo;
import com.csun.cmny.provider.service.hystrix.OmcGroupFeignHystrix;
import com.csun.cmny.provider.service.hystrix.OmcOldmanFeignHystrix;
import com.csun.cmny.security.feign.OAuth2FeignAutoConfiguration;
import com.csun.cmny.util.wrapper.Wrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "cmny-provider-omc", configuration = OAuth2FeignAutoConfiguration.class, fallback = OmcGroupFeignHystrix.class)
public interface OmcGroupFeignApi {

    /*
    * 护工调换角色时,删除用户绑定的护工 -- 若用户是班长不予删除
    * */
    @PostMapping(value = "/api/group/deleteNursingUserBind")
    Wrapper deleteNursingUserBind(@RequestParam("userId") Long userId);

    /*
     * 护工调换角色时,删除用户绑定的护工 -- 若用户是班长不予删除
     * */
    @PostMapping(value = "/api/group/getUserNursingGroupInfo")
    Wrapper<OmcUserVo> getUserNursingGroupInfo(@RequestParam("userId") Long userId);
}
